<!--
 * @Authoer: hujun
 * @Description:金融机构
 * @Date 2017/12/5 14:16
 * @Modified By:
 *
-->
<div id="fincalOrg">
  <yu-panel :title="$t('fincalOrgManager.jrjggl')" :hide-filter="false">
    <template slot="right">
      <yu-button-drop>
        <el-button @click="openCreateFn" v-if="createButton">{{ $t('fincalOrgManager.xz') }}</el-button>
        <el-button @click="openEditFn" v-if="editButton">{{ $t('fincalOrgManager.xg') }}</el-button>
        <el-button @click="deletestFn" v-if="deleteButton">{{ $t('fincalOrgManager.sc') }}</el-button>
        <el-button @click="useFn" v-if="useButton">{{ $t('fincalOrgManager.qy') }}</el-button>
        <el-button @click="unUseFn" v-if="unuseButton">{{ $t('fincalOrgManager.ty') }}</el-button>
      </yu-button-drop>
    </template>
    <template slot="filter">
      <yu-xform v-model="formdata" related-table-name="infotable" form-type="search" label-width="110px">
        <yu-xform-group :column="4">
          <yu-xform-item :label="$t('fincalOrgManager.jrjgdm')" :placeholder="$t('fincalOrgManager.jrjgdm')"
            ctype="input" name="instuCde"></yu-xform-item>
          <yu-xform-item :label="$t('fincalOrgManager.jrjgmc')" :placeholder="$t('fincalOrgManager.jrjgmc')"
            ctype="input" name="instuName"></yu-xform-item>
          <yu-xform-item :label="$t('fincalOrgManager.zt')" :placeholder="$t('fincalOrgManager.zt')" ctype="select"
            name="instuSts" data-code="DATA_STS"></yu-xform-item>
        </yu-xform-group>
      </yu-xform>
    </template>
    <el-table-x ref="infotable" :checkbox="mainGrid.checkbox" :max-height="mainGrid.height" :data-url="mainGrid.dataUrl"
      :data-params="mainGrid.dataParams" :table-columns="mainGrid.tableColumns" @custom-detail-click="openDetailFn">
    </el-table-x>
  </yu-panel>
  <el-dialog-x :center="true" :title="textMap[dialogStatus]" :visible.sync="dialogFormVisible" height="370px"
    width="700px">
    <el-collapse v-model="activeName">
      <el-collapse-item :title="$t('fincalOrgManager.jrjgxx')" name="1">
        <el-form-x ref="form" :group-fields="updateFields" :disabled="formDisabled" label-width="110px"></el-form-x>
      </el-collapse-item>
      <el-collapse-item :title="$t('fincalOrgManager.kzxx')" name="2">
        <el-form-x ref="otherForm" :group-fields="updateOtherFields" :disabled="formDisabled" label-width="110px">
        </el-form-x>
      </el-collapse-item>
    </el-collapse>
    <div slot="footer" align="center">
      <el-button v-if="dialogStatus=='create'" type="primary" @click="saveCreateFn()">{{ $t('fincalOrgManager.qd') }}
      </el-button>
      <el-button v-if="dialogStatus=='update'" type="primary" @click="saveEditFn()">{{ $t('fincalOrgManager.qd') }}
      </el-button>
      <el-button @click="dialogFormVisible = false">{{ $t('fincalOrgManager.qx') }}</el-button>
    </div>
  </el-dialog-x>
</div>